using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsReviews: BusinessObjectBase
	{

		public ClsReviews() {}

		#region InnerClass
		public enum ClsReviewsFields
		{
			QuizID,
			UserID,
			CreateDate,
			Rate
		}
		#endregion

		#region Data Members

			int _quizID;
			int _userID;
			DateTime? _createDate;
			int? _rate;

		#endregion

		#region Properties

		public int  QuizID
		{
			 get { return _quizID; }
			 set
			 {
				 if (_quizID != value)
				 {
					_quizID = value;
					 PropertyHasChanged("QuizID");
				 }
			 }
		}

		public int  UserID
		{
			 get { return _userID; }
			 set
			 {
				 if (_userID != value)
				 {
					_userID = value;
					 PropertyHasChanged("UserID");
				 }
			 }
		}

		public DateTime?  CreateDate
		{
			 get { return _createDate; }
			 set
			 {
				 if (_createDate != value)
				 {
					_createDate = value;
					 PropertyHasChanged("CreateDate");
				 }
			 }
		}

		public int?  Rate
		{
			 get { return _rate; }
			 set
			 {
				 if (_rate != value)
				 {
					_rate = value;
					 PropertyHasChanged("Rate");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("QuizID", "QuizID"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("UserID", "UserID"));
		}

		#endregion

	}
}
